#!/bin/bash

MAXWELL_HOME=/opt/module/maxwell

status_proxy(){
    echo "proxy status"
    curl https://www.google.com/search?q=1
}


start_proxy(){
  export http_proxy=http://192.168.202.1:7890;
  export https_proxy=http://192.168.202.1:7890;
  echo "proxy start";
  echo "export http_proxy=http://192.168.202.1:7890";
  echo "export https_proxy=http://192.168.202.1:7890";
  echo $http_proxy;
  echo $https_proxy;
}


stop_proxy(){
   unset http_proxy;
   unset https_proxy;
   echo "proxy start";
   echo $http_proxy;
   echo $https_proxy;
   echo "unset http_proxy;"
   echo "unset https_proxy;"

}


case $1 in
    start )
        start_proxy
    ;;
    stop )
        stop_proxy
    ;;
    status )
       status_proxy
    ;;
esac

# chmod u+x ./proxy.sh
# ./proxy.sh start|stop|status